package com.zsd.android.opengldemo.view.widget;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;

import com.zsd.android.opengldemo.renderer.FGLRender;

public class FGLView extends GLSurfaceView {

    public FGLView(Context context) {
        super(context);
    }

    public FGLView(Context context, AttributeSet attrs) {
        super(context, attrs);
        setEGLContextClientVersion(2);
        setRenderer(new FGLRender(this));
        //按需渲染，一般用这种，需要自己调用渲染requestRender();
        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
    }
}
